Optimal. Leaf size=51 \[ 2 x \sqrt {\frac {a}{x^2}+\frac {b}{x}}-2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a}}{x \sqrt {\frac {a}{x^2}+\frac {b}{x}}}\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 51, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.385, Rules used = {1979, 2007, 2013, 620, 206} \begin {gather*} 2 x \sqrt {\frac {a}{x^2}+\frac {b}{x}}-2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a}}{x \sqrt {\frac {a}{x^2}+\frac {b}{x}}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 620
Rule 1979
Rule 2007
Rule 2013
Rubi steps
\begin {align*} \int \sqrt {\frac {a+b x}{x^2}} \, dx &=\int \sqrt {\frac {a}{x^2}+\frac {b}{x}} \, dx\\ &=2 \sqrt {\frac {a}{x^2}+\frac {b}{x}} x+a \int \frac {1}{\sqrt {\frac {a}{x^2}+\frac {b}{x}} x^2} \, dx\\ &=2 \sqrt {\frac {a}{x^2}+\frac {b}{x}} x-a \operatorname {Subst}\left (\int \frac {1}{\sqrt {b x+a x^2}} \, dx,x,\frac {1}{x}\right )\\ &=2 \sqrt {\frac {a}{x^2}+\frac {b}{x}} x-(2 a) \operatorname {Subst}\left (\int \frac {1}{1-a x^2} \, dx,x,\frac {1}{\sqrt {\frac {a}{x^2}+\frac {b}{x}} x}\right )\\ &=2 \sqrt {\frac {a}{x^2}+\frac {b}{x}} x-2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a}}{\sqrt {\frac {a}{x^2}+\frac {b}{x}} x}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.03, size = 58, normalized size = 1.14 \begin {gather*} \frac {2 x \sqrt {\frac {a+b x}{x^2}} \left (\sqrt {a+b x}-\sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a+b x}}{\sqrt {a}}\right )\right )}{\sqrt {a+b x}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 3.65, size = 59, normalized size = 1.16 \begin {gather*} \frac {x \sqrt {\frac {a+b x}{x^2}} \left (2 \sqrt {a+b x}-2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a+b x}}{\sqrt {a}}\right )\right )}{\sqrt {a+b x}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.42, size = 93, normalized size = 1.82 \begin {gather*} \left [2 \, x \sqrt {\frac {b x + a}{x^{2}}} + \sqrt {a} \log \left (\frac {b x - 2 \, \sqrt {a} x \sqrt {\frac {b x + a}{x^{2}}} + 2 \, a}{x}\right ), 2 \, x \sqrt {\frac {b x + a}{x^{2}}} + 2 \, \sqrt {-a} \arctan \left (\frac {\sqrt {-a} x \sqrt {\frac {b x + a}{x^{2}}}}{a}\right )\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.16, size = 67, normalized size = 1.31 \begin {gather*} \frac {2 \, a \arctan \left (\frac {\sqrt {b x + a}}{\sqrt {-a}}\right ) \mathrm {sgn}\relax (x)}{\sqrt {-a}} + 2 \, \sqrt {b x + a} \mathrm {sgn}\relax (x) - \frac {2 \, {\left (a \arctan \left (\frac {\sqrt {a}}{\sqrt {-a}}\right ) + \sqrt {-a} \sqrt {a}\right )} \mathrm {sgn}\relax (x)}{\sqrt {-a}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.08, size = 47, normalized size = 0.92 \begin {gather*} \frac {2 \sqrt {\frac {b x +a}{x^{2}}}\, \left (-\sqrt {a}\, \arctanh \left (\frac {\sqrt {b x +a}}{\sqrt {a}}\right )+\sqrt {b x +a}\right ) x}{\sqrt {b x +a}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {\frac {b x + a}{x^{2}}}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 5.18, size = 67, normalized size = 1.31 \begin {gather*} 2\,x\,\sqrt {\frac {a}{x^2}+\frac {b}{x}}+\frac {\sqrt {a}\,\sqrt {x}\,\mathrm {asin}\left (\frac {\sqrt {a}\,1{}\mathrm {i}}{\sqrt {b}\,\sqrt {x}}\right )\,\sqrt {\frac {a}{x^2}+\frac {b}{x}}\,2{}\mathrm {i}}{\sqrt {b}\,\sqrt {\frac {a}{b\,x}+1}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {\frac {a + b x}{x^{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________